package com.welchapps.nporganizer;

import android.app.ActionBar;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
import android.view.MenuItem;

public class QuickPrefsActivity extends PreferenceActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {        
        super.onCreate(savedInstanceState);      
        ActionBar actionBar = getActionBar();
        actionBar.setDisplayHomeAsUpEnabled(true);
        PreferenceManager prefMgr = getPreferenceManager();
        prefMgr.setSharedPreferencesName("defSettings");
        prefMgr.setSharedPreferencesMode(MODE_WORLD_READABLE);
        addPreferencesFromResource(R.layout.pref);        
    }
    
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
        case android.R.id.home:
        	finish();
        	return true;      
        default:
            return super.onOptionsItemSelected(item);
        }
    }
}






